528 research outputs found

    Deterministic Fully Dynamic SSSP and More

    Full text link
    We present the first non-trivial fully dynamic algorithm maintaining exact single-source distances in unweighted graphs. This resolves an open problem stated by Sankowski [COCOON 2005] and van den Brand and Nanongkai [FOCS 2019]. Previous fully dynamic single-source distances data structures were all approximate, but so far, non-trivial dynamic algorithms for the exact setting could only be ruled out for polynomially weighted graphs (Abboud and Vassilevska Williams, [FOCS 2014]). The exact unweighted case remained the main case for which neither a subquadratic dynamic algorithm nor a quadratic lower bound was known. Our dynamic algorithm works on directed graphs, is deterministic, and can report a single-source shortest paths tree in subquadratic time as well. Thus we also obtain the first deterministic fully dynamic data structure for reachability (transitive closure) with subquadratic update and query time. This answers an open problem of van den Brand, Nanongkai, and Saranurak [FOCS 2019]. Finally, using the same framework we obtain the first fully dynamic data structure maintaining all-pairs (1+ϵ)(1+\epsilon)-approximate distances within non-trivial sub-nωn^\omega worst-case update time while supporting optimal-time approximate shortest path reporting at the same time. This data structure is also deterministic and therefore implies the first known non-trivial deterministic worst-case bound for recomputing the transitive closure of a digraph.Comment: Extended abstract to appear in FOCS 202

    Fast Deterministic Fully Dynamic Distance Approximation

    Full text link
    In this paper, we develop deterministic fully dynamic algorithms for computing approximate distances in a graph with worst-case update time guarantees. In particular, we obtain improved dynamic algorithms that, given an unweighted and undirected graph G=(V,E)G=(V,E) undergoing edge insertions and deletions, and a parameter 0<ϵ1 0 < \epsilon \leq 1 , maintain (1+ϵ)(1+\epsilon)-approximations of the stst-distance between a given pair of nodes s s and t t , the distances from a single source to all nodes ("SSSP"), the distances from multiple sources to all nodes ("MSSP"), or the distances between all nodes ("APSP"). Our main result is a deterministic algorithm for maintaining (1+ϵ)(1+\epsilon)-approximate stst-distance with worst-case update time O(n1.407)O(n^{1.407}) (for the current best known bound on the matrix multiplication exponent ω\omega). This even improves upon the fastest known randomized algorithm for this problem. Similar to several other well-studied dynamic problems whose state-of-the-art worst-case update time is O(n1.407)O(n^{1.407}), this matches a conditional lower bound [BNS, FOCS 2019]. We further give a deterministic algorithm for maintaining (1+ϵ)(1+\epsilon)-approximate single-source distances with worst-case update time O(n1.529)O(n^{1.529}), which also matches a conditional lower bound. At the core, our approach is to combine algebraic distance maintenance data structures with near-additive emulator constructions. This also leads to novel dynamic algorithms for maintaining (1+ϵ,β)(1+\epsilon, \beta)-emulators that improve upon the state of the art, which might be of independent interest. Our techniques also lead to improved randomized algorithms for several problems such as exact stst-distances and diameter approximation.Comment: Changes to the previous version: improved bounds for approximate st distances using new algebraic data structure

    Algorithm and Hardness for Dynamic Attention Maintenance in Large Language Models

    Full text link
    Large language models (LLMs) have made fundamental changes in human life. The attention scheme is one of the key components over all the LLMs, such as BERT, GPT-1, Transformers, GPT-2, 3, 3.5 and 4. Inspired by previous theoretical study of static version of the attention multiplication problem [Zandieh, Han, Daliri, and Karbasi arXiv 2023, Alman and Song arXiv 2023]. In this work, we formally define a dynamic version of attention matrix multiplication problem. There are matrices Q,K,VRn×dQ,K, V \in \mathbb{R}^{n \times d}, they represent query, key and value in LLMs. In each iteration we update one entry in KK or VV. In the query stage, we receive (i,j)[n]×[d](i,j) \in [n] \times [d] as input, and want to answer (D1AV)i,j(D^{-1} A V)_{i,j}, where A:=exp(QK)Rn×nA:=\exp(QK^\top) \in \mathbb{R}^{n \times n} is a square matrix and D:=diag(A1n)Rn×nD := \mathrm{diag}(A {\bf 1}_n) \in \mathbb{R}^{n \times n} is a diagonal matrix. Here 1n{\bf 1}_n denote a length-nn vector that all the entries are ones. We provide two results: an algorithm and a conditional lower bound. \bullet On one hand, inspired by the lazy update idea from [Demetrescu and Italiano FOCS 2000, Sankowski FOCS 2004, Cohen, Lee and Song STOC 2019, Brand SODA 2020], we provide a data-structure that uses O(nω(1,1,τ)τ)O(n^{\omega(1,1,\tau)-\tau}) amortized update time, and O(n1+τ)O(n^{1+\tau}) worst-case query time. \bullet On the other hand, show that unless the hinted matrix vector multiplication conjecture [Brand, Nanongkai and Saranurak FOCS 2019] is false, there is no algorithm that can use both O(nω(1,1,τ)τΩ(1))O(n^{\omega(1,1,\tau) - \tau- \Omega(1)}) amortized update time, and O(n1+τΩ(1))O(n^{1+\tau-\Omega(1)}) worst query time. In conclusion, our algorithmic result is conditionally optimal unless hinted matrix vector multiplication conjecture is false

    Dynamic Maxflow via Dynamic Interior Point Methods

    Full text link
    In this paper we provide an algorithm for maintaining a (1ϵ)(1-\epsilon)-approximate maximum flow in a dynamic, capacitated graph undergoing edge additions. Over a sequence of mm-additions to an nn-node graph where every edge has capacity O(poly(m))O(\mathrm{poly}(m)) our algorithm runs in time O^(mnϵ1)\widehat{O}(m \sqrt{n} \cdot \epsilon^{-1}). To obtain this result we design dynamic data structures for the more general problem of detecting when the value of the minimum cost circulation in a dynamic graph undergoing edge additions obtains value at most FF (exactly) for a given threshold FF. Over a sequence mm-additions to an nn-node graph where every edge has capacity O(poly(m))O(\mathrm{poly}(m)) and cost O(poly(m))O(\mathrm{poly}(m)) we solve this thresholded minimum cost flow problem in O^(mn)\widehat{O}(m \sqrt{n}). Both of our algorithms succeed with high probability against an adaptive adversary. We obtain these results by dynamizing the recent interior point method used to obtain an almost linear time algorithm for minimum cost flow (Chen, Kyng, Liu, Peng, Probst Gutenberg, Sachdeva 2022), and introducing a new dynamic data structure for maintaining minimum ratio cycles in an undirected graph that succeeds with high probability against adaptive adversaries.Comment: 30 page

    Training (Overparametrized) Neural Networks in Near-Linear Time

    Get PDF
    The slow convergence rate and pathological curvature issues of first-order gradient methods for training deep neural networks, initiated an ongoing effort for developing faster second\mathit{second}-order\mathit{order} optimization algorithms beyond SGD, without compromising the generalization error. Despite their remarkable convergence rate (independent\mathit{independent} of the training batch size nn), second-order algorithms incur a daunting slowdown in the cost\mathit{cost} per\mathit{per} iteration\mathit{iteration} (inverting the Hessian matrix of the loss function), which renders them impractical. Very recently, this computational overhead was mitigated by the works of [ZMG19,CGH+19}, yielding an O(mn2)O(mn^2)-time second-order algorithm for training two-layer overparametrized neural networks of polynomial width mm. We show how to speed up the algorithm of [CGH+19], achieving an O~(mn)\tilde{O}(mn)-time backpropagation algorithm for training (mildly overparametrized) ReLU networks, which is near-linear in the dimension (mnmn) of the full gradient (Jacobian) matrix. The centerpiece of our algorithm is to reformulate the Gauss-Newton iteration as an 2\ell_2-regression problem, and then use a Fast-JL type dimension reduction to precondition\mathit{precondition} the underlying Gram matrix in time independent of MM, allowing to find a sufficiently good approximate solution via first\mathit{first}-order\mathit{order} conjugate gradient. Our result provides a proof-of-concept that advanced machinery from randomized linear algebra -- which led to recent breakthroughs in convex\mathit{convex} optimization\mathit{optimization} (ERM, LPs, Regression) -- can be carried over to the realm of deep learning as well

    Nearly Optimal Communication and Query Complexity of Bipartite Matching

    Full text link
    We settle the complexities of the maximum-cardinality bipartite matching problem (BMM) up to poly-logarithmic factors in five models of computation: the two-party communication, AND query, OR query, XOR query, and quantum edge query models. Our results answer open problems that have been raised repeatedly since at least three decades ago [Hajnal, Maass, and Turan STOC'88; Ivanyos, Klauck, Lee, Santha, and de Wolf FSTTCS'12; Dobzinski, Nisan, and Oren STOC'14; Nisan SODA'21] and tighten the lower bounds shown by Beniamini and Nisan [STOC'21] and Zhang [ICALP'04]. We also settle the communication complexity of the generalizations of BMM, such as maximum-cost bipartite bb-matching and transshipment; and the query complexity of unique bipartite perfect matching (answering an open question by Beniamini [2022]). Our algorithms and lower bounds follow from simple applications of known techniques such as cutting planes methods and set disjointness.Comment: Accepted in FOCS 202

    Flexible and stretchable electronics for wearable healthcare

    Get PDF
    Measuring the quality of human health and well-being is one of the key growth areas in our society. Preferably, these measurements are done as unobtrusive as possible. These sensoric devices are then to be integrated directly on the human body as a patch or integrated into garments. This requires the devices to be very thin, flexible and sometimes even stretchable. An overview will be given of recent technology developments in this domain and concrete application examples will be shown
    corecore